package cn.javasm.web;

import cn.javasm.entity.User;
import cn.javasm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

/**
 * @version: 0.1
 */
@Controller
public class UserController {

    @Autowired
    private UserService userService;

    public void registUser(User user){
        userService.registUser(user);
    }

    public void updateUser(User user){
        userService.updateUser(user);
    }

    public void deleteUserById(int id){
        userService.deleteUserById(id);
    }

    public User queryUserById(int id){
        return userService.queryUserById(id);
    }
}
